High-Efficiency Video Coding (HEVC) is a new international video coding standard that is being developed by the Joint Collaborative Team on Video Coding (JCT-VC). HEVC is based on block-based motion-compensated transform coding architecture. The basic unit for compression, termed Coding Unit (CU), is a 2N×2N square block, and each CU can be recursively split into four smaller CUs until a predefined minimum size is reached. Each CU contains one or multiple Prediction Units (PUs). The PU sizes can be 2N×2N, 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, or N×N, where 2N×N, 2N×nU, 2N×nD and N×2N, nL×2N, nR×2N correspond to horizontal and vertical partition of a 2N×2N PU with symmetric or asymmetric PU size division respectively.
To further increase the coding efficiency of motion vector coding in HEVC, the motion vector competition (MVC) based scheme is used to select one motion vector predictor (MVP) among a given MVP candidate set which includes spatial and temporal MVPs. For the Inter mode in HM-5.0, the Advanced Motion Vector Prediction (AMVP) scheme is used to select a motion vector predictor among an AMVP candidate set including two spatial MVPs and one temporal MVP. The MVP candidate set is used to code the motion vector (MV) of an underlying block. FIG. 1 illustrates the spatial MVP candidates for the Inter mode according to HM-5.0, where the two spatial MVPs are:
1. Left spatial predictor (the first available MV from Am+1 and Am), and
2. Top spatial predictor (the first available MV from Bn+1, Bn, and B−1).
The five spatial candidate blocks are divided into left predictor group and top predictor group. The first available MV from the candidate blocks in each group is selected as the spatial MVP derived from the group. The search order for the first available MV associated with the neighboring blocks in each group is indicated by the arrows in FIG. 1. For the top candidate blocks, the search order is from right to left. For the left candidate blocks, the search order is from bottom to top. The left-side neighboring blocks comprise a lower-left block (Am+1) and a bottom-aligned left block (Am). The top-side neighboring blocks comprise three blocks corresponding to an upper-left block (B−1), a right-aligned top block (Bn) and an upper-right block (Bn+1). During the MVP derivation process, there may be situations that none of the candidate blocks has an associated MV. In this case, the MVP is not available for the group. For example, if neither Am nor Am+1 has an associated MV, the left predictor does not exist. Therefore, the AMVP candidate set may contain less than 3 MVP candidates.
After the spatial predictors are derived, a temporal predictor is derived and added to the MVP candidate set. After all the spatial and temporal predictors are derived, a redundancy checking process is performed to identify and remove any duplicated candidate. Therefore, the maximum number of checking operations associated with the redundancy checking is 3. After the redundancy checking/removal process is performed, the number of existing candidates is checked. If the number is smaller than a threshold, a zero motion vector checking process is performed. The threshold is set to the maximum number of AMVP candidates indicated by AMVP_MAX_NUM_CANDS in HM-5.0 (AMVP_MAX_NUM_CANDS=2). The zero MV checking process checks whether the zero MV exists in the current candidate set. If the zero MV is not in the current candidate set, it is added to the MVP candidate set. In this process, there is one checking operation needed. Therefore, the maximum number of checking operations for the two checking processes mentioned above is 4.
FIG. 2 illustrates a decision flowchart of the MVP derivation according to HM-5.0. The MVP candidates, including the spatial MVP and the temporal MVP, are provided to redundancy checking process in step 210. The redundancy checking process checks whether any duplication exists in the MVP candidates. If there is any duplicated MVP candidate, the duplicated MVP candidate is removed. If there is no MVP candidate exists, the zero MV is added to the MVP candidate set. The number of AMVP candidates is then checked to determine whether it is smaller than 2 in step 220. If the number of MVP candidates is not smaller than 2, the decision process is terminated. Otherwise, the zero MV checking process is performed in step 230 to determine whether the MVP candidate set includes the zero MV. If the MVP candidate set does not include the zero MV, the zero MV is added to the MVP candidate set as shown in step 240. Otherwise, the decision process is terminated. The decision process for the MVP candidate set involves quite a few checking operations. It is desirable to reduce the required number of operations to speed up system operation.